/******************************************************************************************************
Copyright (C) 2008 Mestrelab Research S.L. All rights reserved.

This file is part of the MNova scripting toolkit.

Authorized users of MNova Software may use this file freely, but this file is provided AS IS
with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
*****************************************************************************************************/

function peakTest()
{
	var spec = new NMRSpectrum( nmr.activeSpectrum() );
	var sR = new SpectrumRegion( 7.0, 7.5 ); 
	var ps = new Peaks(spec, sR); //fill the list with the peaks in sR
	print(ps);
	var p = new Peak(1.26, spec);
	p.annotation="Disolvent";
	print(p);
	ps.append(p);
	//var myPeak = new Peak( 8,08, 122.1 );
	//ps.append(myPeak);
	spec.setPeaks(ps);//Set the peaks to ps
	print( spec.peaks());
	spec.update();
	mainWindow.activeWindow().update();
}